#pragma once
#include "front.h"
#include "back.h"

enum{
	INIT,
	FRONT,
	PROXY
};

class manager{
public:
	manager();
	~manager();

	int closeConn();
	int setFrontFd(int fd);
	int createConn();
	

	int sendToBack(const char*msg, int msg_len);
	int sendToFront(const char*msg, int msg_len);

	int setBackIpPort(const string &ip, int port);

public:
	front *frontConn;
	back *backConn;

	int flag;//
};

